<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            width: 200px;
            height: 200px;
            background-color: purple;
            float: left;
        }
        .box2{
            width: 500px;
            height: 500px;
            background-color: red;
            float: right;
        }
        .box3{
            width: 100px;
            height: 100px;
            background-color: skyblue;
            /* clear: left; */
/*清除左侧浮动元素的影响（实质是给该元素添加了上外边距200px）*/
            /* clear: right; */
/*清除右侧浮动元素的影响*/
            clear: both;
/*清除对该元素影响最大的浮动元素的影响*/
        }
    </style>
</head>
<body>
    <div class="box1">1</div>
    <div class="box2">2</div>
    <div class="box3">3</div>
</body>
</html>